<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<!--

  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
  Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
  The contents of this file are subject to the terms of either the GNU
  General Public License Version 2 only ("GPL") or the Common Development
  and Distribution License("CDDL") (collectively, the "License").  You
  may not use this file except in compliance with the License. You can obtain
  a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
  or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
  language governing permissions and limitations under the License.
 
  When distributing the software, include this License Header Notice in each
  file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
  Sun designates this particular file as subject to the "Classpath" exception
  as provided by Sun in the GPL Version 2 section of the License file that
  accompanied this code.  If applicable, add the following below the License
  Header, with the fields enclosed by brackets [] replaced by your own
  identifying information: "Portions Copyrighted [year]
  [name of copyright owner]"
 
  Contributor(s):
 
  If you wish your version of this file to be governed by only the CDDL or
  only the GPL Version 2, indicate your decision by adding "[Contributor]
  elects to include this software in this distribution under the [CDDL or GPL
  Version 2] license."  If you don't indicate a single choice of license, a
  recipient has the option to distribute your version of this file under
  either the CDDL, the GPL Version 2 or to extend the choice of license to
  its licensees as provided above.  However, if you add GPL Version 2 code
  and therefore, elected the GPL Version 2 license, then the option applies
  only if the new code is made subject to such option by the copyright
  holder.

  @(#)package.html	1.10 07/07/02

-->

</HEAD>
<BODY BGCOLOR="white">

Classes specific to Internet mail systems.
This package supports features that are specific to Internet mail systems
based on the MIME standard
(<A HREF="http://www.ietf.org/rfc/rfc2045.txt" TARGET="_top">RFC 2045</A>,
<A HREF="http://www.ietf.org/rfc/rfc2045.txt" TARGET="_top">RFC 2046</A>, and
<A HREF="http://www.ietf.org/rfc/rfc2045.txt" TARGET="_top">RFC 2047</A>).
The IMAP, SMTP, and POP3 protocols use
{@link javax.mail.internet.MimeMessage MimeMessages}.
<P>
The JavaMail API specification requires support for the following properties,
which must be set in the <code>System</code> properties.
The properties are always set as strings; the Type column describes
how the string is interpreted.  For example, use (in J2SE 1.2 and newer)
<PRE>
	System.setProperty("mail.mime.address.strict", "false");
</PRE>
to set the <CODE>mail.mime.address.strict</CODE> property,
which is of type boolean.
<P>
<TABLE BORDER>
<TR>
<TH>Name</TH>
<TH>Type</TH>
<TH>Description</TH>
</TR>

<TR>
<TD>mail.mime.address.strict</TD>
<TD>boolean</TD>
<TD>
The <code>mail.mime.address.strict</code> session property controls
the parsing of address headers.  By default, strict parsing of address
headers is done.  If this property is set to <code>"false"</code>,
strict parsing is not done and many illegal addresses that sometimes
occur in real messages are allowed.  See the <code>InternetAddress</code>
class for details.
</TD>
</TR>

<TR>
<TD>mail.mime.charset</TD>
<TD>String</TD>
<TD>
The <code>mail.mime.charset</code> System property can
be used to specify the default MIME charset to use for encoded words
and text parts that don't otherwise specify a charset.  Normally, the
default MIME charset is derived from the default Java charset, as
specified in the <code>file.encoding</code> System property.  Most
applications will have no need to explicitly set the default MIME
charset.  In cases where the default MIME charset to be used for
mail messages is different than the charset used for files stored on
the system, this property should be set.
</TD>
</TR>

<TR>
<TD>mail.mime.decodetext.strict</TD>
<TD>boolean</TD>
<TD>
The <code>mail.mime.decodetext.strict</code> property controls
decoding of MIME encoded words.  The MIME spec requires that encoded
words start at the beginning of a whitespace separated word.  Some
mailers incorrectly include encoded words in the middle of a word.
If the <code>mail.mime.decodetext.strict</code> System property is
set to <code>"false"</code>, an attempt will be made to decode these
illegal encoded words. The default is true.
</TD>
</TR>

<TR>
<TD>mail.mime.encodeeol.strict</TD>
<TD>boolean</TD>
<TD>
The <code>mail.mime.encodeeol.strict</code> property controls the
choice of Content-Transfer-Encoding for MIME parts that are not of
type "text".  Often such parts will contain textual data for which
an encoding that allows normal end of line conventions is appropriate.
In rare cases, such a part will appear to contain entirely textual
data, but will require an encoding that preserves CR and LF characters
without change.  If the <code>mail.mime.encodeeol.strict</code>
System property is set to <code>"true"</code>, such an encoding will
be used when necessary.  The default is false.
</TD>
</TR>

<TR>
<TD>mail.mime.decodefilename</TD>
<TD>boolean</TD>
<TD>
If set to <code>"true"</code>, the <code>getFileName</code> method
uses the <code>MimeUtility</code>
method <code>decodeText</code> to decode any
non-ASCII characters in the filename.  Note that this decoding
violates the MIME specification, but is useful for interoperating
with some mail clients that use this convention.
The default is false.
</TD>
</TR>

<TR>
<TD>mail.mime.encodefilename</TD>
<TD>boolean</TD>
<TD>
If set to <code>"true"</code>, the <code>setFileName</code> method
uses the <code>MimeUtility</code>
method <code>encodeText</code> to encode any
non-ASCII characters in the filename.  Note that this encoding
violates the MIME specification, but is useful for interoperating
with some mail clients that use this convention.
The default is false.
</TD>
</TR>

<TR>
<TD>mail.mime.decodeparameters</TD>
<TD>boolean</TD>
<TD>
If set to <code>"true"</code>, non-ASCII parameters in a
<code>ParameterList</code>, e.g., in a Content-Type header,
will be encoded as specified by
<A HREF="http://www.ietf.org/rfc/rfc2231.txt" TARGET="_top">RFC 2231</A>.
The default is false.
</TD>
</TR>

<TR>
<TD>mail.mime.encodeparameters</TD>
<TD>boolean</TD>
<TD>
If set to <code>"true"</code>, non-ASCII parameters in a
<code>ParameterList</code>, e.g., in a Content-Type header,
will be decoded as specified by
<A HREF="http://www.ietf.org/rfc/rfc2231.txt" TARGET="_top">RFC 2231</A>.
The default is false.
</TD>
</TR>

<TR>
<TD>mail.mime.multipart. ignoremissingendboundary</TD>
<TD>boolean</TD>
<TD>
Normally, when parsing a multipart MIME message, a message that is
missing the final end boundary line is not considered an error.
The data simply ends at the end of the input.  Note that messages
of this form violate the MIME specification.  If the property
<code>mail.mime.multipart.ignoremissingendboundary</code> is set
to <code>false</code>, such messages are considered an error and a
<code>MesagingException</code> will be thrown when parsing such a
message.
</TD>
</TR>


<TR>
<TD>mail.mime.multipart. ignoremissingboundaryparameter</TD>
<TD>boolean</TD>
<TD>
If the Content-Type header for a multipart content does not have
a <code>boundary</code> parameter, the multipart parsing code
will look for the first line in the content that looks like a
boundary line and extract the boundary parameter from the line.
If this property is set to <code>"false"</code>, a
<code>MessagingException</code> will be thrown if the Content-Type
header doesn't specify a boundary parameter.
The default is true.
</TD>
</TR>

</TABLE>



<P>
The following properties are supported by Sun's implementation of
JavaMail, but are not currently a required part of the specification.
As above, these must be set as <CODE>System</CODE> properties.
The names, types, defaults, and semantics of these properties may
change in future releases.
<P>
<TABLE BORDER>
<TR>
<TH>Name</TH>
<TH>Type</TH>
<TH>Description</TH>
</TR>

<TR>
<TD>mail.mime.base64.ignoreerrors</TD>
<TD>boolean</TD>
<TD>
If set to <code>"true"</code>, the BASE64 decoder will ignore errors
in the encoded data, returning EOF.  This may be useful when dealing
with improperly encoded messages that contain extraneous data at the
end of the encoded stream.  Note however that errors anywhere in the
stream will cause the decoder to stop decoding so this should be used
with extreme caution.  The default is false.
</TD>
</TR>

<TR>
<TD>mail.mime.foldtext</TD>
<TD>boolean</TD>
<TD>
If set to <code>"true"</code>, header fields containing just text
such as the <code>Subject</code> and <code>Content-Description</code>
header fields, and long parameter values in structured headers such
as <code>Content-Type</code> will be folded (broken into 76 character lines)
when set and unfolded when read.  The default is true.
</TD>
</TR>

<TR>
<TD>mail.mime.setcontenttypefilename</TD>
<TD>boolean</TD>
<TD>
If set to <code>"true"</code>, the <code>setFileName</code> method
will also set the <code>name</code> parameter on the <code>Content-Type</code>
header to the specified filename.  This supports interoperability with
some old mail clients.  The default is true.
</TD>
</TR>

<TR>
<TD>mail.mime.setdefaulttextcharset</TD>
<TD>boolean</TD>
<TD>
When updating the headers of a message, a body
part with a <code>text</code> content type but no <code>charset</code>
parameter will have a <code>charset</code> parameter added to it
if this property is set to <code>"true"</code>.
The default is true.
</TD>
</TR>

<TR>
<TD>mail.mime.applefilenames</TD>
<TD>boolean</TD>
<TD>
Apple Mail incorrectly encodes filenames that contain spaces,
forgetting to quote the parameter value.  If this property is
set to <code>"true"</code>, JavaMail will try to detect this
situation when parsing parameters and work around it.
The default is false.
</TD>
</TR>

<TR>
<TD>mail.alternates</TD>
<TD>String</TD>
<TD>
A string containing other email addresses that the current user is known by.
The <code>MimeMessage</code> <code>reply</code> method will eliminate any
of these addresses from the recipient list in the message it constructs,
to avoid sending the reply back to the sender.
</TD>
</TR>

<TR>
<TD>mail.replyallcc</TD>
<TD>boolean</TD>
<TD>
If set to <code>"true"</code>, the <code>MimeMessage</code>
<code>reply</code> method will put all recipients except the original
sender in the <code>Cc</code> list of the newly constructed message.
Normally, recipients in the <code>To</code> header of the original
message will also appear in the <code>To</code> list of the newly
constructed message.
</TD>
</TR>

</TABLE>

</BODY>
</HTML>
